<template>
  <div class="bigbox">
    <div>
      <span  class="demonstration">储存管理</span>
      <el-select v-model="value" placeholder="全部" @change="sizer">
        <el-option
          v-for="item in options"
          :key="item.value"
          :label="item.label"
          :value="item.value"
          
        >
        </el-option>
      </el-select>
    </div>
    <div class="block">
      <span class="demonstration">创建时间</span>
      <el-date-picker v-model="value1" type="date" class='dateinput'>
      </el-date-picker>
    </div>
    <div>
      <el-input
        placeholder="请输入内容"
        v-model="search"
        class="input-with-select"
      >
        <el-button @click="searchfun" slot="append" icon="el-icon-search"></el-button>
      </el-input>
    </div>
    <div>
        <el-checkbox v-model="checked">会员预警到期</el-checkbox>
    </div>
  </div>
</template>

<script>
import eventBus from '../../../util/eventBus'
export default {
  data() {
    return {
      checked: true,
      options: [
        {
          value: "",
          label: "全部",
        },
        {
          value: "VIP1",
          label: "VIP1",
        },
        {
          value: "VIP2",
          label: "VIP2",
        },
        {
          value: "VIP3",
          label: "VIP3",
        },
      ],
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now();
        },
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
      value:"",
      value1: "",
      value2: "",
      search: "",
    };
  },
  methods:{
    sizer(){
      this.$emit('sizerfun',this.value)
    },
    
    searchfun(){
      //查询按钮
      this.$emit('searchfundata',this.search)
    }
  }
};
</script>

<style lang="less" scoped>
.dateinput{
    /deep/.el-input__inner{width:245px;}
}
.bigbox{
    margin-bottom: 20px;
    display: flex;
    justify-content:flex-start;
    div:nth-of-type(2){margin-left:20px;margin-right:60px;}
    div:nth-of-type(3){margin-right:50px;}
}
.demonstration{
    margin-right: 15px;
}
/deep/.el-checkbox__label{
    line-height: 40px;
}
</style>